home *** CD-ROM | disk | FTP | other *** search
/ Revista CD Expert 37 / CD Expert nº 37.iso / LastCall / lastcall.exe / stuff / lastcall.dxr / 00160.ls < prev    next >
Encoding:
Text File  |  2000-03-27  |  2.2 KB  |  95 lines

  1. on putFlashCounts
  2.   repeat with n = 1 to the number of castMembers of castLib "Flashers"
  3.     thisMem = member(n, "flashers")
  4.     if thisMem.type = #flash then
  5.       put thisMem.name && thisMem.frameCount
  6.     end if
  7.   end repeat
  8. end
  9.  
  10. on putFlashRects
  11.   repeat with n = 1 to the number of castMembers of castLib "Flashers"
  12.     thisMem = member(n, "flashers")
  13.     if thisMem.type = #flash then
  14.       put "member (" & QUOTE & thisMem.name & QUOTE & "," && QUOTE & "flashers" & QUOTE & ").regpoint =" && thisMem.regPoint
  15.     end if
  16.   end repeat
  17. end
  18.  
  19. on getLiquidColor pIngredient
  20.   return getIngredientThing(pIngredient, #color, white())
  21. end
  22.  
  23. on getCapacity glassType
  24.   global gGlassware
  25.   if glassType = #beer then
  26.     return 12
  27.   else
  28.     return gGlassware[glassType][#capacity]
  29.   end if
  30. end
  31.  
  32. on isGarnish pIngredient
  33.   return getCategory(pIngredient) = 9
  34. end
  35.  
  36. on isMixer pIngredient
  37.   return getOne([4, 5], getCategory(pIngredient))
  38. end
  39.  
  40. on isPowder pIngredient
  41.   return getCategory(pIngredient) = 7
  42. end
  43.  
  44. on isLiquor pIngredient
  45.   return getOne([2, 3, 6, 8], getCategory(pIngredient))
  46. end
  47.  
  48. on getMouthList pCharCode
  49.   global gMouthList
  50.   return gMouthList[pCharCode]
  51. end
  52.  
  53. on getHeight glassType
  54.   global gGlassware
  55.   return gGlassware[glassType][#FILLHEIGHT]
  56. end
  57.  
  58. on getArea glassType
  59.   global gGlassware
  60.   r = gGlassware[glassType][#DIAMETER] / 2.0
  61.   return PI * r * r
  62. end
  63.  
  64. on getDosage pIngredient, Quantity, inSprite
  65.   global gIngredients, gGlassware
  66.   if voidp(gIngredients[pIngredient]) then
  67.     return EMPTY
  68.   else
  69.     dosage = string(Quantity)
  70.     if pIngredient = #ice then
  71.       Full = gGlassware[inSprite.pGlassType][#capacity] / 2.0
  72.       if inSprite.pContents[#ice] >= (Full * 0.66000000000000003) then
  73.         return "      "
  74.       else
  75.         if inSprite.pContents[#ice] > 0 then
  76.           return "(Half)"
  77.         else
  78.           return "(Empty)"
  79.         end if
  80.       end if
  81.     else
  82.       if isGarnish(pIngredient) then
  83.         return integer(Quantity)
  84.       else
  85.         if pIngredient = #beer then
  86.           return integer(Quantity) && gIngredients[pIngredient][#QUANTITY_SING]
  87.         else
  88.           measure = gIngredients[pIngredient][#SHORT_UNITS]
  89.         end if
  90.       end if
  91.     end if
  92.     return dosage && measure
  93.   end if
  94. end
  95.